package cn.edu.zafu.bigdata.XuShuXin.Exp1022;

public class XuShuxinRectangle_2 extends XuShuxinShape_2{

    double length;
    double width;

    //构造方法
    public XuShuxinRectangle_2(double length, double width) {
        this.length = length;
        this.width = width;
    }

    @Override
    public double area() {
        return length * width;
    }

    @Override
    public double perimenter() {
        return 2 * (length + width);
    }
}
